<?php
/*
 * Created on 06.01.2006
 *
 */

class c_anchorHandler 
{

    function startElement (& $sender, $attrs)
    {
        $parent = $sender->topParent();
        if ($parent['tag'] != 'url')
            die ("Parent of anquor must be url and must have attribute var\n");
        if (!$attrs['value'])
        {
            die ("Attribute value are missing at anquor tag\n");
        }
        $sender->appendCode('$__'."url->setAnquor(".$attrs['value'].");\n");        
    }
    
    function endElement (& $sender)
    {
    }

}

?>
